Installing manually the Kanzi build environment for Android
Before you can build your Kanzi application, set up and configure the build environment for your target platforms. Build environment includes tools that the building system uses to build your application for the target platforms.
You can find the build definitions for supported platforms in your Kanzi project directory. For example, <KanziWorkspace>/Projects/<ProjectName>/Application/configs/platforms.
The preferred way is to install the Kanzi build environment for Android using the Kanzi Build Environment tool. See Installing Kanzi build environment for Android.
Installing manually the Kanzi build environment for Android
To manually set up the Kanzi build environment for Android:
- Install Kanzi. See Installing Kanzi.
- Install Python 3.x:
- For example, download and install Python 3.3.
- Add and set
PYTHON_HOME environment variable to the Python 3.x installation path (for example, C:\Python33). - Add Python 3.x installation path (for example,
C:\Python33) to your system path.
- Install Python 2.7.x.
For example, download and install Python 2.7.
- Install SCons 2.0.x:
- For example, download and install SCons 2.0.1. During the installation select the Python 2.7.x version you installed.
- Add the location where Python 2.7.x scripts are stored (for example,
C:\Python27\Scripts) to your system path.
- Install Java Development Environment Kit 7 (1.7) or newer (Windows x86, 32-bit version):
- Download and install Java Development Environment Kit 7 (1.7) or newer (Windows x86, 32-bit version).
- Add and set
JAVA_HOME environment variable to the JDK installation path. - Add
%JAVA_HOME%\bin to your system path.
-
Install Apache Ant 1.8.4 or newer:
- Download and install Apache Ant 1.8.4 or newer.
- Add and set
ANT_HOME environment variable to the Apache Ant installation path.
- Add
%ANT_HOME%\bin to your system path.
- Install Android SDK 2.3.3 or newer (Kanzi requires API level 10 or newer):
- Download and install Android SDK.
- After installing Android SDK, run the SDK manager and install updates. Recommended updates:
- SDK Platform Android 2.3 and 4.0.3
- Android SDK Platform Tools
- USB driver package
- Add Android SDK installation path to your system path.
- Add Android SDK Platform-tools installation path to your system path.
- Install the latest Android NDK:
- Download and install Android NDK.
- Add and set
NDK_PATH environment variable to the Android NDK installation path.
- Install the USB device drivers for your Android device:
- Find the Android USB driver on Android developer website page Android OEM USB Drivers.
- Follow the installation instructions provided on the Android developer website or the manufacturer of your device.
- On your Android device:
- In Settings enable Development options.
- In Settings > Security enable Unknown sources.
- (Optional) To check that the device drivers are installed correctly, connect your Android device to your computer, run
adb devices command in the Windows command prompt.
If the Android USB driver is installed correctly, your device is listed in the command output.
Viewing the Kanzi environment variables
To view the current Kanzi environment variables, in Kanzi Studio, select > User Preferences > Advanced tab and click Open Build Environment Configuration button.
Setting the Kanzi environment variables
Kanzi Command Prompt and Kanzi Studio build system use the environment variables to build Kanzi applications.
You can set the Kanzi environment variables in these ways:
- Set the environmental variables in kanzi_environment_variables.bat, Kanzi's internal environment variable configuration. This allows you to configure Kanzi build environment without changing your system's environment variables. That way you can have other software on the same computer using existing configuration and tools.
Kanzi uses your system's environment variables for all variables not set in kanzi_environment_variables.bat.
You can find kanzi_environment_variables.bat in ProgramData/Rightware/<KanziVersion>.
- Set the system environment variables in your computer system settings. This way you set the same environment variables for your entire computer system.
You can access your system environment variables by right-clicking Computer in the Start Menu and by selecting Properties > Advanced System Settings > Advanced > Environment Variables.
Set these environment variables:
- PYTHON_HOME to Python 3.x path
- SCONS_HOME to Python 2.7.x scripts directory that contains scons.bat
- JAVA_HOME to JDK version 7 (1.7.0) path
- ANT_HOME to Apache Ant version 1.8.4 path
- ANDROID_SDK to Android SDK path
- NDK_PATH to Android NDK path
- KANZI_HOME to your Kanzi workspace
Testing your Kanzi build environment for Android
To test whether your Kanzi build environment for Android works, create a Kanzi application for Android and deploy it to your device. See Deploying Kanzi applications to Android and Creating your first application.
See also
Installing Kanzi build environment for Android
Deploying Kanzi applications to Android
Creating your first application
Open topic with navigation